---
title: Installation
description: Get started with Marvin in under a minute
icon: download
---

## Requirements

- Python 3.10 or higher
- An API key from an LLM provider (OpenAI by default)

## Install `marvin`

The easiest way to install Marvin is a package manager like `pip` or [`uv`](https://docs.astral.sh/uv/):

<CodeGroup>

```bash uv
# add marvin to your project
uv add marvin
# add marvin to your script
uv add --script some_script.py marvin
# run a python process with marvin installed ephemerally
uv run --with marvin some_script.py
```

```bash pip
pip install marvin
```
</CodeGroup>


## Configure your LLM provider

By default, Marvin uses OpenAI's models. Set your API key as an environment variable:

```bash
export OPENAI_API_KEY="your-api-key"
```

To use another provider, see the docs on [configuring LLMs](/guides/configure-llms).

## Development Installation

For development, install Marvin with development dependencies:

<CodeGroup>

```bash uv
git clone https://github.com/prefecthq/marvin.git
cd marvin
uv venv && source .venv/bin/activate
uv sync --dev
```

```bash pip
git clone https://github.com/prefecthq/marvin.git
cd marvin
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
```
</CodeGroup>

## What's Next?

- Follow the [Quickstart](/quickstart) guide to build your first AI application
- Learn about [Tasks](/concepts/tasks), the building blocks of AI workflows
- Explore [Agents](/concepts/agents) to create specialized AI workers
- Read about [Threads](/concepts/threads) for managing conversation context 